<template>
	<h2>我是孙组件</h2>
	<div>孙组件接收参数: {{ a }}==={{ b }}==={{ c }}==={{ d }}</div>
	<div>inject: {{ aVal }}</div>
	<el-button type="primary" @click="handleChange(5000)">修改C的值</el-button>
	<el-button type="primary" @click="changeA(5000)">修改injectA值</el-button>
	<el-button type="primary" @click="changeD('hello')">修改injectD值</el-button>
</template>
<script lang="ts" setup>
import axios from 'axios';
import type { objInterface } from '@/interface'

defineProps<{
	a: number,
	b: number,
	c: number,
	d: objInterface,
	handleChange: (value: number) => void
}>()
const { aVal, changeA, changeD } = inject('sendSon', {
	aVal: 0,
	changeA: (value: number) => {},
	changeD: (value: string) => {}
});

const { data } = await axios.get('https://v2.alapi.cn/api/qinghua?token=token');
console.log('data===', data);

</script>
